<template>
  <div>
    <p>{{message}}</p>
    <button v-on:click="reverseString">反转字符串</button>
  </div>
</template>

<script>
export default {
  name: 'reverseString',
  data () {
    return {
      message: 'runoob'
    }
  },
  methods: {
    reverseString: function () {
      this.message = this.message.split('').reverse().join('')
    }
  }
}
</script>
